package net.lcqf.tcp.utils;

import net.lcqf.tcp.constants.Constants;
import net.lcqf.tcp.game.room.RoomManager;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2021-2025 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2025/3/6 11:27
 * // +----------------------------------------------------------------------
 */
public final class LocalCacheUtil {

    // 玩家的自增ID, 没写用户登录，临时先用下
    public final static AtomicInteger ATOMIC = new AtomicInteger(Constants.NUM_ZERO);

    // 房间号 默认：1
    public final static AtomicInteger ROOM = new AtomicInteger(Constants.NUM_ZERO);

    public final static AtomicInteger ROOM_EXECUTOR = new AtomicInteger(Constants.NUM_ZERO);

    public final static AtomicInteger MATCH_EXECUTOR = new AtomicInteger(Constants.NUM_ZERO);

    // 房间号，对应房间的玩家信息
    public final static Map<Integer, RoomManager> ACTIVE_ROOM = new ConcurrentHashMap<>();
}
